<?php
namespace app\personal\controller;
use think\Controller;
use think\Db;
use think\Request;
use think\Session;

class Index extends Controller
{
    //查询
    public function index()
    {
        if(empty(Session::get('id'))){
            $this->error('请先登录账号...','./login/index');
        } else {
            $id = Session::get('id');
            var_dump($id);
            $list1 = Db::table('user')->where('id',$id)->find();
            $list2 = Db::table('user_info')->where('uid',$id)->find();
            $this->assign('title','个人资料');
            $this->assign('list1',$list1);
            $this->assign('list2',$list2);
            $this->assign('id',$id);
            var_dump($list1);
            var_dump($list2);
            
            return $this->fetch('index/index');
        }
    }

}
